<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.css" />
	<h:outputStylesheet library="css" name="main.css" />
    <script src="http://cdn.leafletjs.com/leaflet-0.4/leaflet.js">z</script>
	<script src="resources/js/map.js">z</script>

</h:head>

<h:body>
	<div class="header1">
		<h:outputLink value="home.jsf" >
					<h1>#{generalText.label_title}</h1>
			</h:outputLink>

		<h:form class="loginform" id="loginform">
			<h:panelGroup rendered="#{not userBean.authenticated}">
				<div>
					<h:outputLabel value="#{loginText.label_login}" for="logininput" />
					<h:inputText value="#{loginBean.login}" id="logininput" />
					<h:message for="logininput" styleClass="error" />
				</div>
				<div>
					<h:outputLabel value="#{loginText.label_password}"
						for="passwordinput" />
					<h:inputSecret value="#{loginBean.password}" id="passwordinput" >
						<f:converter converterId="eu.quadran.passwordConverter" />
					</h:inputSecret>
					<h:message for="passwordinput" styleClass="error" />

					<h:outputText value=" " />
					<h:commandLink action="#{loginBean.action}" styleClass="palelink">
						<h:outputText value="#{loginText.action_login}" />
					</h:commandLink>
					<h:outputText value=" / " />
					<h:link value="#{loginText.action_register}" styleClass="palelink"
						outcome="gotoregisterpage" />
				</div>

			</h:panelGroup>
			<h:panelGroup layout="block" rendered="#{userBean.authenticated}">
				<div>
					<h:outputText value="#{loginText.label_loggedas}" />
					<h:outputText value="#{userBean.user.login}" />
				</div>
				<div class="right">
					<h:commandLink action="#{loginBean.logoff}" styleClass="palelink">
						<h:outputText value="#{loginText.action_logoff}" />
					</h:commandLink>
				</div>
			</h:panelGroup>
		</h:form>
	</div>
	<div class="header2">
		<h2>
			<ui:insert name="subtitle" />
		</h2>
	</div>
	<div class="body">
		<h:panelGroup id="error">
			<h:message for="error" styleClass="error" />
		</h:panelGroup><br/>

		<!-- User portlets -->
		<h:panelGroup styleClass="portlet" rendered="#{userBean.authenticated}">

		<!-- Simple User portlets -->
		<h:panelGroup styleClass="portlet" rendered="#{not userBean.user.company}">
			<h:panelGroup  rendered="#{view.viewId ne '/definejobexchange.xhtml'}">
				<h:outputText value="#{portletText.label_jobexchange_title}" /><br/>
					
				<h:panelGroup rendered="#{userBean.user.jobExchange ne null}">
				
				</h:panelGroup>
				
				<h:panelGroup rendered="#{userBean.user.jobExchange eq null}">
					<h:outputLink value="definejobexchange.jsf" >
						<h:outputText value="#{portletText.label_jobexchange_notdefined}" />
					</h:outputLink>
					<br/>
						
				</h:panelGroup>
						
			</h:panelGroup>		
			<br/>
		</h:panelGroup>
		</h:panelGroup>
		<ui:insert name="body" />
	</div>
</h:body>
<ui:insert name="action" />

</html>
